import { app } from '../../config/index';

/** 获取个人中心信息 */
export const fetchUserCenter = () =>{
  return new Promise((resolve) => {
    // 开发者妥善保管用户快速填写的头像昵称，避免重复弹窗
    wx.getUserProfile({
      desc: '用于完善用户个人资料',
      success: ({userInfo}) => {
        app.globalData.userInfo = userInfo
        resolve(userInfo)
      }
    })
  });
}
